package com.java.struts.comment.dao;

import com.java.struts.base.util.HibernateUtil;
import com.java.struts.comment.eneity.FoodcommentinfoEntity;
import org.hibernate.query.Query;

import java.util.List;

public class CommentDao {

    public List<FoodcommentinfoEntity> getComment(){
        //执行sql语句
        Query query=HibernateUtil.getQuery("from FoodcommentinfoEntity");
        //拿到数据集
        List<FoodcommentinfoEntity> list=query.list();
        //返回数据集
        return  list;
    }

}
